﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework;

namespace Comp477Project
{
    public class Island
    {
        public Model myModel;
        public Matrix world;
        public Island(ContentManager content)
        {
            myModel = content.Load<Model>(@"island/Island");
            world =Matrix.CreateScale(4.0f)*Matrix.CreateRotationX(MathHelper.ToRadians(-90)) * Matrix.CreateTranslation(0,0,0);

        }
        public void draw(Matrix view,Matrix projection)
        {
            foreach (ModelMesh mesh in myModel.Meshes)
            {
                foreach (BasicEffect effect in mesh.Effects)
                {
                    effect.EnableDefaultLighting();
                    effect.World = world;//transforms[mesh.ParentBone.Index];
                    effect.View = view;
                    effect.Projection = projection;

                }
                mesh.Draw();


            }
        }
    }
}
